package com.itdata.common;

/***
 * 
 * 数据封装类，用来后台向前台转发数据的时候使用
 * 
 */
public class GenericResult<T> {
	public T 		data;							//当前页的数据
	public int 		totalSize = 0;					//数据总条数
	public String 	result = "";
	public String 	reason = "";
	public String   error = "";
	
	public void failed(){
		this.result = Constant.FAILED;
	}
	
	public void success(){
		this.result = Constant.SUCCESS;
	}
	
	public void error(String err){
		this.error = err;
	}
	
	public void reason(String r){
		this.reason = r;
	}
	public String getResult() {
		return result;
	}
	public void setResult(String result) {
		this.result = result;
	}
	public String getReason() {
		return reason;
	}
	public void setReason(String reason) {
		this.reason = reason;
	}
	public T getData() {
		return data;
	}
	public void setData(T data) {
		this.data = data;
	}
	public int getTotalSize() {
		return totalSize;
	}
	public void setTotalSize(int totalSize) {
		this.totalSize = totalSize;
	}
}
